package com.eco.fanliapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.fanliapp.entity.SyUserMoney;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-08-07
 */
@Mapper
public interface SyUserMoneyMapper extends BaseMapper<SyUserMoney> {

    int updateUserCashBalanceAmount(@Param("money") BigDecimal money, @Param("userId") Long userId);

    int wxPaySuccessUpdate(@Param("userId") Long userId, @Param("amount") String amount);

    int updateUserGoldhBalanceAmount(@Param("gold") Integer gold, @Param("userId") Long userId);

    String countGoldBalanceAmount(@Param("companyId") Integer companyId, @Param("flag") Integer flag);

    String countYesterdayGoldBalanceAmount();

    SyUserMoney selectByUserId(@Param("userId") Long userId);

    Integer getGoldNum(@Param("userId") Long userId);
}
